<template>
  <div>
    <el-table-v2 :columns="columns" :data="data" :width="1000" :height="900" fixed />
  </div>
</template>

<script lang="ts" setup>
import DataWorker from "./dataWorker.js?worker&inline";
const columns = new Array(25).fill(0).map((item, index) => ({
  key: index,
  dataKey: `column${index}`,
  title: `Column ${index}`,
  width: 150,
}));
const data = ref([]);
const dataWorker = new DataWorker();
dataWorker.addEventListener("message", (e) => {
  data.value = e.data;
});
dataWorker.postMessage(columns);
</script>
